package vn.com.aptech.msh.utils;

import java.io.Serializable;
import java.util.Map;
import javax.faces.context.FacesContext;
import javax.inject.Named;

/**
 *
 * @author trietto
 */
@Named("guestPreferences")
public class GuestPreferences implements Serializable {

    private String theme = "mint-choc"; //default

    public String getTheme() {
        Map<String, String> params = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();
        if (params.containsKey("theme")) {
            theme = params.get("theme");
        }

        return theme;
    }

    public void setTheme(String theme) {
        this.theme = theme;
    }
}
